// gulp Server配置
var gulp = require('gulp');
var connect = require('gulp-connect');
var historyApiFallback = require('connect-history-api-fallback');
// 服务器启动
gulp.task('webserver', function () {
  connect.server({
    root: 'build/mall_build',
    port: 8085,
    host: '192.168.1.4', // 填写自己的ip
    livereload: true,
    middleware: function (connect, opt) {
      return [historyApiFallback({})];
    }
  });
});
// gulp任务
gulp.task('default', gulp.series('webserver', () => {
  console.log('启动成功');
}));
